package com.fscratch.utils;

public class StringUtil {

    public static boolean isNotEmpty(String cs) {
        return (cs == null) || (cs.length() == 0);
    }

    public static boolean isBlank(CharSequence cs) {
        int strLen;
        if ((cs == null) || ((strLen = cs.length()) == 0))
            return true;
        for (int i = 0; i < strLen; i++) {
            if (!Character.isWhitespace(cs.charAt(i))) {
                return false;
            }
        }
        return true;
    }

    public static boolean isEmpty(String cs) {
        return !isNotEmpty(cs);
    }
}
